package cn.jbit.biz.impl;

import java.util.List;

import cn.jbit.biz.UserBiz;
import cn.jbit.dao.UserDao;
import cn.jbit.dao.impl.UserDaoImpl;
import cn.jbit.entity.User;
import cn.jbit.util.Page;

public class UserBizImpl implements UserBiz{
	UserDao userDao=new UserDaoImpl();
	@Override
	public User login(String uname, String upwd) {
		return userDao.findUser(uname, upwd);
	}

	@Override
	public int getUserListCount(String keyWord) {
		
		return userDao.getUserListCount(keyWord);
	}

	@Override
	public List<User> getUserList(String keyWord,Page page,String sq) {
		List<User> list=userDao.getUserList(keyWord,page,sq);
		return list;
	}
	
	public boolean addUser(String uname, String upwd){
		boolean flag=userDao.addUser(uname, upwd);
		return flag;
	}

	@Override
	public boolean DelUser(String uname) {
		boolean flag=userDao.DelUser(uname);
		return flag;
	}

	@Override
	public boolean ReviseUser( String uname, String upwd) {
		boolean flag=userDao.ReviseUser(uname, upwd);
		return flag;
	}

}